package com.platform.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.platform.comm.constants.GlobalConstant;
import com.platform.comm.dto.AbstractQo;
import com.platform.comm.enums.YnEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * Description: 系统日志-DTO
 *
 * @author libin Created on 2019/7/18
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class LogQo extends AbstractQo {

    private static final long serialVersionUID = 9217016384021533722L;
    /**
     * 操作名称
     */
    private String operateName;

    /**
     * 模块名称
     */
    private String moduleName;

    /**
     * 操作类型
     */
    private String operateType;

    /**
     * 请求路径
     */
    private String requestUrl;

    /**
     * 操作人员
     */
    private String userId;

    /**
     * 操作人员名称
     */
    private String userName;

    /**
     * 登录名称
     */
    private String loginName;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = GlobalConstant.DATE_TIME_PATTERN, shape = JsonFormat.Shape.STRING)
    @DateTimeFormat(pattern = GlobalConstant.DATE_TIME_PATTERN)
    private LocalDateTime operateDate;

    /**
     * 远程地址
     */
    private String remoteAddress;

    /**
     * 操作结果
     */
    private String actionResult;

    /**
     * 是否成功
     */
    private YnEnum success;

    private String type;

    @Override
    public void init() {
    }
}
